<template>
  <div class="param-info" v-if="Object.keys(GoodsParams).length !==0">
    <table v-for="(table,index) in GoodsParams.sizes" class="info-size" :key="index">
      <tr v-for="(tr,indey) in table" :key="indey">
        <td v-for="(td,indez) in tr" :key="indez">{{td}}</td>
      </tr>
    </table>
    <table>
      <tr v-for="(item,index) in GoodsParams.infos" class="info-param">
        <td class="info-param-key">{{item.key}}</td>
        <td class="param-value">{{item.value}}</td>
      </tr>
    </table>
    <div v-if="GoodsParams.image" class="info-image">
      <img :src="GoodsParams.image" alt="">
    </div>
  </div>
</template>

<script>
  export default{
    props:{
      GoodsParams:{
        type:Object,
        default(){
          return {}
        }
      }
    }
  }
</script>

<style scoped="scoped">
.param-info{
  padding: 20px 15px;
  font-size: 15px;
  border-bottom: 5px solid #f2f2f8;
}
.param-info table{
  width: 100%;
  border-collapse: collapse;
}
.param-info table tr{
  height: 42px;
}
.param-info table tr td{
  border-bottom: 1px solid rgba(100,100,100,.1);
}
.info-param-key{
  width: 95px;
}
.info-param{
  border-top: 1px solid rgba(0,0,0,.1);
}
.param-value{
  color: #eb4868;
}
.info-image{
  width: 100%;
}
</style>
